<?php $this->headScript()->appendFile(HTTP_HOST.'/js/index.js'); ?>
<?php $obj = $this->object; ?>

<?php 
	$mainimage = reset($obj['images']);
	if ($mainimage['Main'] != 1) {
		foreach ($obj['images'] as $v) {
			if ($v['Main'] == 1) $mainimage = $v;
		}
	}
	$this->headScript()->captureStart();
?>
	$(document).ready(function(){
		$('._obj_gallery_items a').click(function(){
			$('#bigphoto').attr('src', $(this).attr('rel'));
		});
	});
<?php $this->headScript()->captureEnd(); ?>
<div style="position: relative; float: left; padding: 0px; width: 406px; margin: 50px 0px 9px 0px; font-family: verdana; font-size: 10.4pt; font-wieght: bold; color: #398bd6; text-transform: uppercase;">
	<?=$obj['Name']; ?>
</div>
<div style="position: relative; float: right; width: 105px; display: block; height: auto; font-family: verdana; font-weight: bold; font-size: 10.4pt; color: #ff832a; margin: 50px 0px 0px 0px; padding: 0px;">
	<?=$obj['Price']; ?> <?=$obj['CurrencyHTML'];?>
</div>

<div style="position: relative; float: left; width: 500px; height: auto; font-family: verdana; font-size: 8.64pt; font-weight: normal; color: #269872;">
	<?=$this->object['country']['Name'] ?>  |  <?=$this->object['region']['Name'] ?>  |  <?=$this->object['city']['Name'] ?>
</div>


<?php if (sizeof($obj['images']) > 0): ?>
<div style="position: relative; float: left; width: 520px; height: auto; right: 8px; margin-top: 31px;">
	<div style="position: relative; margin: 0px 8px 0px 0px; z-index: 100;">
		<img src="<?=HTTP_HOST?>/images/aurora/<?=$this->objtypefile?>" alt="" style="position: absolute; float: right; right: -36px; top: -22px;"/>
	</div>
	<div style="position: relative; z-index: 99; margin: 0px 0px 0px 7px;">
		<img  id="bigphoto" src="<?=Obj_Image::thumbnail($mainimage, 529);?>" onload="updateImageCover(this)" alt="" style="border: 1px solid #e6e6e6;"/>
		<img src="<?=HTTP_HOST?>/images/aurora/country_template/empty.gif" alt="" class="cover" style="border: none; position: absolute; top: 0px; left: 0px; width: 497px; height: 0px;"/>
	</div>
</div>
<div style="margin: 5px 7px 0px 0px; position: relative; float: left; width: 100%">
	<?php foreach ($obj['images'] as $v) { ?>
		<div style="float: left; width: 80px; height: 80px; margin: 0px 4px 4px 0px; padding: 0px; border: solid 1px #e6e6e6;" class="_obj_item_photo"><a href="javascript:;" rel="<?=Obj_Image::thumbnail($v, 529)?>"><img src="<?=Obj_Image::thumbnail($v, 80, 80)?>" alt="" style="border: none"/></a></div>
	<?php } ?>
</div>
<?php endif;?>
<div id="object_data_params" style="position: relative; float: left; width: 494px; height: auto; margin: 0px 0px 0px 0px; padding: 15px 17px 5px 7px;">
	<table id="main_settings" style="position: relative; float: left; width: 350px; font-family: verdana; font-size: 11px; color: #666666; margin-right: 10px;">
		<tr><td><?=$this->translate('Тип объекта: ').'</td><td>'.$this->object['Object_type']['Name']; ?></td></tr>
		<?=($this->object['DistanceToSea'] > 0 && is_int((int)$this->object['DistanceToSea']))?'<tr><td class="txt">'.$this->translate('Расстояние до моря: ').'</td><td>'.$this->object['DistanceToSea'].$this->translate(' м.').'</td></tr>':'';?>
		<?=($this->object['DistanceToAirport'] > 0 && is_int((int)$this->object['DistanceToAirport']))?'<tr><td class="txt">'.$this->translate('Расстояние до аэропорта: ').'</td><td>'.$this->object['DistanceToAirport'].$this->translate(' км.').'</td></tr>':''; ?>
		<?=($this->object['YearOfConstruction'] > 0 && is_int((int)$this->object['YearOfConstruction']))?'<tr><td class="txt">'.$this->translate('Год постройки: ').'</td><td>'.$this->object['YearOfConstruction'].'</td></tr>':''; ?>
		<?=($this->object['Floor'] > 0 && is_int((int)$this->object['Floor']))?'<tr><td class="txt">'.$this->translate('Количество этажей объекта: ').'</td><td>'.$this->object['Floor'].'</td></tr>':''; ?>
		<?=($this->object['Area'] > 0 && is_int((int)$this->object['Area']))?'<tr><td class="txt">'.$this->translate('Площадь от: ').'</td><td>'.$this->object['Area'].' м<sup>2</sup></td></tr>':''; ?>
		<?=($this->object['AreaTo'] > 0 && is_int((int)$this->object['AreaTo']))?'<tr><td class="txt">'.$this->translate('Площадь до: ').'</td><td>'.$this->object['AreaTo'].' м<sub>2</sub></td></tr>':''; ?>
		<?=($this->object['NumberOfBedrooms'] > 0 && is_int((int)$this->object['NumberOfBedrooms']))?'<tr><td class="txt">'.$this->translate('Количество спален: ').'</td><td>'.$this->object['NumberOfBedrooms'].'</td></tr>':''; ?>
		<?=($this->object['NumberOfBathrooms'] > 0 && is_int((int)$this->object['NumberOfBathrooms']))?'<tr><td class="txt">'.$this->translate('Количество ванных комнат: ').'</td><td>'.$this->object['NumberOfBathrooms'].'</td></tr>':''; ?>
	</table>
	<table id="secondary_settings" style="position: relative; float: right; width: 130px; font-family: verdana; font-size: 11px; color: #666666;"> 
		<?=($this->object['SwimmingPool'] == 1 && is_int((int)$this->object['SwimmingPool']))?'<tr><td>'.$this->translate('Бассейн;').'</td><td>':'';?>
		<?=($this->object['Parking'] == 1 && is_int((int)$this->object['Parking']))?'<tr><td>'.$this->translate('Паркинг;').'</td><td>':'';?>
		<?=($this->object['Security'] == 1 && is_int((int)$this->object['Security']))?'<tr><td>'.$this->translate('Охрана;').'</td><td>':'';?>
		<?=($this->object['Elevator'] == 1 && is_int((int)$this->object['Elevator']))?'<tr><td>'.$this->translate('Лифт;').'</td><td>':'';?>
		<?=($this->object['ChildrensPool'] == 1 && is_int((int)$this->object['ChildrensPool']))?'<tr><td>'.$this->translate('Детский бассейн;').'</td><td>':'';?>
		<?=($this->object['Playground'] == 1 && is_int((int)$this->object['Playground']))?'<tr><td>'.$this->translate('Детская площадка;').'</td><td>':'';?>
		<?=($this->object['Heating'] == 1 && is_int((int)$this->object['Heating']))?'<tr><td>'.$this->translate('Отопление;').'</td><td>':'';?>
		<?=($this->object['HotWater'] == 1 && is_int((int)$this->object['HotWater']))?'<tr><td>'.$this->translate('Горячая вода;').'</td><td>':'';?>
	</table>
</div>
<div class="print_short_detail" style="position: relative; float: left; width: 100%; height: auto; font-family: verdana; font-size: 7.92pt; font-weight: normal; text-transform: uppercase; color: #398bd6; padding: 6px 0px 0px 0px;">
	<?=$this->translate('Короткое описание:'); ?>
</div>
<div class="print_short_detail_text" style=" position: relative; float: left; width: 100%; height: auto; font-family: verdana; font-size: 7.92pt; color: #666666; text-align: justify; font-weight: normal; padding: 6px 0px 0px 0px;">
	<?=$obj['ShortDescription']; ?>
</div>

<div class="print_short_detail" style="position: relative; float: left; margin-top: 15px; width: 100%; height: auto; font-family: verdana; font-size: 7.92pt; font-weight: normal; text-transform: uppercase; color: #398bd6; padding: 6px 0px 0px 0px;">
	<?=$this->translate('Полное описание:'); ?>
</div>
<div class="print_short_detail_text" style=" position: relative; float: left; width: 100%; height: auto; font-family: verdana; font-size: 7.92pt; color: #666666; text-align: justify; font-weight: normal; padding: 6px 0px 0px 0px;">
	<?=$obj['FullDescription']; ?>
</div>

<div id="print_copy" style=" position: relative; float: right; text-align: right; width: 100%; font-size: 6.48pt; font-family: Tahoma; font-weight: normal; color: #398bd6; padding: 0px; margin: 20px 0px 20px 0px;">
	© 2011 Аврора Инвестмент
</div>

